<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>员工信息列表-freemarker</title>
</head>
<body>
<form action="selectEmpByName.do">
    请输入用户名：<input name="ename" type="text"><input type="submit" value="查询"/>
</form>
<br>
<table border="1" cellspacing="0">
    <tr>
        <td>编号</td>
        <td>姓名</td>
        <td>工资</td>
        <td>入职日期</td>
        <td>性别</td>
        <td colspan="2" align="center">操作</td>
    </tr>
    <#list pageInfo.list as emp>
        <tr>
            <th>${emp.empno}</th>
            <th>${emp.ename}</th>
            <th>${emp.salary}</th>
            <th>${emp.hiredate}</th>
            <th>${emp.sex}</th>

            <th><a href="selectEmpById.do?empno=${emp.empno}">修改</a></th>
            <th><a href="deleteEmpById.do?empno=${emp.empno}">删除</a></th>
        </tr>
    </#list>

</table>
<br><br>
<div>
    <a href="toAddPage.do">添加</a>
</div>
<div>
    <#if !pageInfo.isFirstPage>
        <a href="selectAllEmpList.do?pageNum=${pageInfo.pageNum-1}">上一页</a>
    </#if>
    &emsp;&emsp;
    <#list pageInfo.getNavigatepageNums() as page_num>
        <#if pageInfo.pageNum==page_num>
            <a href="#" >${page_num}</a>
        </#if>
        <#if pageInfo.pageNum!=page_num>
            <a href="selectAllEmpList.do?pageNum=${page_num}" >${page_num}</a>
        </#if>
    </#list>
    &emsp;&emsp;
    <#if !pageInfo.isLastPage>
        <a href="selectAllEmpList.do?pageNum=${pageInfo.pageNum+1}">下一页</a>
    </#if>

    <br>
</div>
</body>
</html>